package com.github.zxhtom.excel;

import com.github.zxhtom.excel.utils.OSUtils;

import java.util.List;

/**
 * @package com.github.zxhtom.excel
 * @Class ExportThread
 * @Description TODO
 * @Author zhangxinhua
 * @Date 19-11-7 下午4:14
 */
public class ExportThread<T> extends Thread {
    private Excel excel ;
    private List<T> ts ;
    public ExportThread(List<T> ts ,Excel excel) {
        this.excel = excel;
        this.ts=ts;
    }

    @Override
    public void run() {
        long start = OSUtils.sysInfo();
        excel.export(ts);
        long end = OSUtils.sysInfo();
        System.out.println(excel.getClass().getSimpleName()+"导出用时："+(end - start));
    }
}
